import req from "/@/api/req";
export enum Api {
  upload = "common/upload",
}

export interface UploadFileParam {
  file: any;
  [key: string]: any;
}

export interface UploadFileResult {
  code: number;
  url: string;
}

export function uploadFile(data: UploadFileParam) {
  return req.upload<UploadFileResult>({
    url: Api.upload,
    data,
  });
}
